Thermal fluid fields reconstruction for nanofluids convection based on physics-informed deep learning

Based on physics-informed deep learning method, the deep learning model is proposed for thermal fluid fields reconstruction. This method applied fully-connected layers to establish the mapping function from design variables and space coordinates to physical fields of interest, and then the performance characteristics Nusselt number Nu and Fanning friction factor f can be calculated from the reconstructed fields. Compared with reconstruction model based on convolutional neural network, the improved model shows no constrains on mesh generation and it improves the physical interpretability by introducing conservation laws in loss functions. To validate this method, the forced convection of the water-Al2O3 nanofluids is utilized to construct training dataset. As shown in this paper, this deep neural network can reconstruct the physical fields and consequently the performance characteristics accurately. In the comparisons with other classical machine learning methods, our reconstruction model is superior for predicting performance characteristics. In addition to the effect of training size on prediction power, the extrapolation performance (an important but rarely investigated issue) for important design parameters are also explored on unseen testing datasets.

Thermal fluid fields reconstruction for nanofluids convection based on physics-informed deep learning Yunzhu Li 1 , Tianyuan Liu 1,2 & Yonghui Xie 1* Based on physics-informed deep learning method, the deep learning model is proposed for thermal fluid fields reconstruction. This method applied fully-connected layers to establish the mapping function from design variables and space coordinates to physical fields of interest, and then the performance characteristics Nusselt number Nu and Fanning friction factor f can be calculated from the reconstructed fields. Compared with reconstruction model based on convolutional neural network, the improved model shows no constrains on mesh generation and it improves the physical interpretability by introducing conservation laws in loss functions. To validate this method, the forced convection of the water-Al 2 O 3 nanofluids is utilized to construct training dataset. As shown in this paper, this deep neural network can reconstruct the physical fields and consequently the performance characteristics accurately. In the comparisons with other classical machine learning methods, our reconstruction model is superior for predicting performance characteristics. In addition to the effect of training size on prediction power, the extrapolation performance (an important but rarely investigated issue) for important design parameters are also explored on unseen testing datasets. www.nature.com/scientificreports/ a 1 Length of extension (μm) a 2 Length between inlet and first groove/protrusion (μm) a 3 Groove interval (μm) u ∞ Inlet velocity (m·s −1 ) C P Specific heat (J·kg − Approximate mapping for physical fields b * The optimal Bias of fully-connected layer

List of symbols
Variance operation W Weights of fully-connected layer b Bias of fully-connected layer B General differential operators that define boundary conditions R Real vector space s The first moment estimations r The second moment estimations R 2 Determination coefficient for performance characteristics L 1 Relative field norm-1 error L 2 Relative field norm-2 error W * The optimal weight of fully-connected layer Greek symbols D Sampling space of dataset N (•) Nonlinear partial differential equations operators Learnable parameter set * www.nature.com/scientificreports/ among grid points efficiently. Despite great potential, practical implementation applying CNN models to computational or experimental fluid dynamics remains limited. Firstly, the field reconstruction task realized by CNN models is still a black box without physics interpretability, and the successes of CNN models mainly rely on the powerful feature extraction and the ability to resolve nonlinear problems. In essence, the thermal and fluids examples are driven by prior knowledge of conservation laws. Secondly, due to the special convolution operations on feature, the input or output fed to CNN model should be preprocessed to structure grid data. In addition to some examples with simple geometry or structure whose grids can be easily transformed to required structured data 38 , the physical fields of most thermal and fluids examples with complicated geometry should be interpolated to designed structured grid points, which may cause the lack of information around large gradience. Besides, the definition of default values in areas without fields information is a pending problem. For thermal and fluid mechanics, there exists an obvious prior physical knowledge, which is conservation principles, and all available data respect the physical laws given by conservation principles. Many trials have been made to incorporate and enforce known flow physics in applications of DNN. Zhao 39 combined domain knowledge and ANN to predict the critical heat flux. In the multi-scaled GAN constructed by Lee 34 , the conservation principles are formulated using the triangle inequality to approximate to the original forms and the loss function of conservation principles is minimized to compare the difference between predicted fields and ground truth. However, the introduction of physical informed loss function requires the pre-designed nontrainable convolutional filters 38 or loss equations around the whole fields 34,35 , and it heavily depends on the mesh information.
Recently, physics-informed neural networks (PINNs) introduced by Karniadakis and Raissi 40,41 that are trained to solve supervised tasks respecting physical laws are introduced. According to their explorations of physics informed neural network on surface breaking crack identification 42 , biological reactions 43 , compartmental disease transmission models 44 vortex-induced vibrations 45 , heat transfer problems 46 and other flow mechanism 47 , the physics conservation principles can be utilized to be loss function and regularization term with the automatic differentiation and the back-propagation mechanism, which can be essentially regarded as prior knowledge to constrain the space of admissible solutions. Another advantage is physics-informed neural networks can provide a mesh-free solver as the discrete interpolators in both space and time over the computational domain, which can efficiently handle the unstructured mesh of any numerical methods. Thus, the possibility of using PINNs to approximate flow in idealized stenosis 48 , arterial blood pressure 49 and high-speed flow 50 are investigated. Moreover, Karniadakis 51 extended PINNs (XPINNs) to space-time domain decomposition for nonlinear partial differential equations in arbitrary complex-geometry domains. Based on XPINNs and another extension (namely the conservative PINNs 52 ), a distributed framework for PINNs 53 is proposed with several advantages, such as parallelization capacity, large representation ability, efficient hyperparameter tuning and is particularly effective for multi-scale and multi-physics problems.
To the best of authors' knowledge, this is the first attempt of applying PINNs on the field reconstruction for nanofluids convection problem. In this study, we applied PINNs to reconstruct physical fields (pressure, temperature and velocity) of nanofluids convection from varying design variables, including Reynold number, nanofluids properties, geometric parameters and boundary conditions. The primary contributions of this work are listed as followed: 1. The physics-informed and mesh-free prediction model for nanofluids convection in microchannels is proposed to reconstruct all interested physical fields and then extract the heat transfer characteristics (Nu and f for instance) directly. 2. This method enforces the conservation laws by introducing mass, momentum and energy continuity equations to guide the training of deep learning neural network. 3. To evaluate the accuracy of our model in the sense of theory and engineering, the performance of reconstructed fields, conservational residual and the heat transfer and flow characteristics interested in engineering are discussed in detail. 4. Except for the effect of training size, we also focus on an important but lack of attention issue, that is the extrapolation ability of the neural network on the unknown domains.
The main context of this paper is organized as followed: In section B, the overall architecture of applied physics informed neural network is presented and the data set of nanofluids convection applied to train and test reconstruction network is described. Next, the prediction performance is analyzed for physical field visualizations. Detailed physical fields distributions, evaluation criteria and performance are conducted in section C. And then the comparisons of our method and other surrogate models on the prediction performance of performance characteristics are presented. Moreover, the effect of training size and the extrapolation performance are investigated in the latter part of section C. Finally, the conclusions are summarized in section D.

Methods
Overall architecture. In physics-informed neural network, the mathematical physics is enforced as partial differential equations (PDE) or ordinary differential equations. The steady governing equations for heat transfer and flow of nanofluids can be expressed as Eq. (1), including the mass, momentum and energy conservation principles. www.nature.com/scientificreports/ where N (•) are the nonlinear PDE operators representing the conservation principles, x is the space coordinate, θ is a state parameters set to describe the physical system such as fluid properties, boundary conditions, and geometry of the domain, which can be expressed as a D θ -dimensional vector; ρ and ν represent density and viscosity of the fluid, respectively; b f is the body force; and Ω denotes the fluid computational domain. The velocities u, pressure p and temperature t can be regarded as functions of the space coordinate x, and variable parameters θ. Specifically, the physical fields can be uniquely determined when suitable boundary conditions are prescribed, where B is the general differential operators that define the boundary conditions and ∂Ω denotes the boundary regions. Given a set of specific parameters θ, the mapping functions of physical fields, i.e. u(x), p(x) and t(x), can be obtained by discretizing corresponding governing equations in the Eq. (1) using numerical methods, such as Finite Difference /Finite Volume /Finite Element methods. However, the numerical process requires time-consuming mesh generation and iteratively solving large linear/nonlinear systems. Due to the tedious regeneration of computational mesh, the traditional numerical methods become more challenging with diverse geometries involved. Different from the traditional numerical methods, the PINNs simply focuses on the reconstruction of physical scalars for single temporal and spatial point rather than the whole physical fields in one prediction. This strategy enables the deep neural network solving the conservation principle quickly without the trouble of mesh generation. To describe the process of numerical method and reconstruction model, some mathematic expressions are listed as follows.
As shown in Eq. (3), the training data is obtained by the traditional numerical or experimental methods based on design parameters θ and coordinates x, and the acquisition method of raw physical fields ψ = {p,u T ,t} T is considered as a mapping F(x,θ) . Correspondingly, the well-trained deep neural network model constructs an approximate mapping F(x, θ ; �) with learnable parameters substituting for the traditional method F(x,θ) to reconstruct physical fields ψ = {p,û T ,t} T . According to the description of the heat transfer and flow problem in Eq. (1-2), the key point of reconstructing physical fields is trying to conform with the nonlinear PDEs N (x, θ) = 0 and differential operator B(x, θ) = 0 . Thus, the cost function of the model is considered as the combination shown in Eq. (4). Remarkably, as described in Eq. (5), the training process of the model can be regarded as the optimization process of the proper learning parameters * with the cost function L.
Nanofluids heat convection problem. In this study, a two-dimensional convection problem for the water-Al 2 O 3 nanofluids in microchannels are validated regarding to this physics informed neural network model. Though the application of nanofluids become engineering gradually and the application scenario becoming more and more complex, the fundamental researches on the heat and flow behavior in simplified microchannel is still important and necessary. Thus, a simple microchannel model as depicted in Fig. 1 is studied. The microchannel is composed by top wall and bottom wall, where the bottom wall is a smooth plate with infinite length while the top wall is a roughed infinite plated with two grooves/protrusions. The total length of the microchannel is a and the height is H. The inlet and outlet are extended to ensure fully developed and prevent the nanofluids from flowing backward. The lengths of extensions are both a 1 . The locations of two grooves/protrusions are determined by the interval of a 3 and the length between the inlet and first groove/protrusion a 2 . And the geometries of two grooves/protrusions are defined by two parameters: radius R 1 and R 2 , and relative depth δ 1 = d 1 /R 2 and δ 2 = d 2 /R 2 . It should be noticed that the depth of the groove is positive d > 0 while the depth of protrusion is negative d < 0. Five geometric parameters related to the location and shapes of grooves/protrusions, including interval of a 3 , radius R 1 and R 2 , and relative depth δ 1 and δ 2 , are set as design variables and the other geometric constants are listed in Table 1.
The water-Al 2 O 3 nanofluids is composed of base fluid water and nanoparticles Al 2 O 3 with a diameter of 30 nm at a certain proportion. In practice, the heat transfer and flow problem for nanofluids is a kind of multiphase  Table 2, and thermo-physical properties nanofluids are calculated as followed.
The density of applied nanofluids ρ n is calculated as: where φ denotes the volume fraction of nanofluids, ρ b and ρ p represent the density of base fluid water and nanoparticles Al 2 O 3 , respectively. The specific heat capacity 54 of applied nanofluids Cp n is calculated as: where Cp b and Cp p represent the specific heat capacity of base fluid water and nanoparticles Al 2 O 3 , respectively. The thermal conductivity 55 of nanofluids λ n is defined as: where λ b and λ p represent the specific heat capacity of base fluid water and nanoparticles Al 2 O 3 , and is shown as below: The dynamic viscosity coefficient 1 of nanofluids µ n is formulated as where µ b dynamic viscosity coefficient of water.
Considering the infinite microchannel studied in this work, the calculation models are simplified to twodimensional models. Thus, mathematic expression of conservation equations for incompressible nanofluids in Eq. (1) can be written as: where u and v are the velocity along x and y coordinate; p and t represent temperature and pressure quantities; α n = n /ρ n Cp n is defined as the thermal diffusion coefficient.
The numerical simulations are all obtained by solving conservation equations with the commercial numerical software FLUENT. To confirm the simulation accuracy, the SIMPLE algorithm is adopted to couple pressure and velocity item and the calculation domains are discretized by the second-order upwind scheme. As listed in Eq. (14)(15), the inlet condition is set as velocity input and the inlet temperature of nanofluids is defined at 293 K; the non-slip wall condition is imposed on both up and down walls and the same constant heat flux is set for top and bottom walls.; the outlet pressure of atmosphere is utilized.
Reynold number Re is defined as:  www.nature.com/scientificreports/ where the hydraulic diameter D h is 2H, and u ∞ is the inlet velocity. The mesh generations for all cases are performed by software ICEMCFD. As shown in Fig. 2, the structured grids are divided into the whole computational domain and the grids around grooves/protrusions are refined. According to the physical geometry, the mesh model is composed of three parts: inlet extension, outlet extension and reconstruction region which is utilized as training and testing datasets.

Dataset description.
To embrace the physics information as much as possible, about 6000 cases with eight design variables for the water-Al 2 O 3 nanofluids in the microchannel including properties of nanofluids, geometric parameters and boundary conditions are sampled by Latin Hypercubic Sampling method. The raw dataset is divided into two parts: the training dataset (50%, 3000 cases) and the testing dataset (50%, 3000 cases). The configurations and layouts of two protrusions and grooves are important for heat transfer and flow behavior. Thus, the geometric parameters including radium R 1 /R 2 , relative depth δ 1 /δ 2 of grooves/protrusions and the interval length a 3 between two grooves/protrusions are taken as design variables. Besides, the volume fraction φ of nanofluids is set as one of the design variables because it becomes a determining factor for the thermo-physical properties once the nanoparticle is determined. Finally, the boundary conditions including Reynold number Re indicating the inlet velocity and the heat flux q imposed on top and bottom walls are also taken into consideration. All the design variables and their ranges are listed in Table 3.
Apparently, each case for microchannel with nanofluids is determined by design variables θ = {θ 1 , θ 2 , · · · , θ D θ } T , which is θ = {Re, ϕ, a 3 , R 1 , R 2 , δ 1 , δ 2 , q} T in this study. For each case, the computational domain is divided by 800 × 40 grid points and only 550 × 40 grid points containing main heat transfer and flow characteristics in the reconstruction region are used. Every grid point is considered as a sample point located by corresponding coordinates x = {x, y} T for training and testing dataset. Therefore, the input for a sample point is the combination of design variables and coordinates ξ = {x T , θ T } T and the output is the interested physical quantities ψ = {p, u, v, t} T , that is pressure p, temperature t and velocity attributes along two coordinates u and v.
With 550 × 40 sample points in each case, there are 132,000,000 sample points can be collected in all 6000 cases. The input of the training dataset is represented as D N ξ = {ξ 1 , ξ 2 , . . . , ξ N } , while the output physical fields can be defined as D N ψ = {ψ 1 , ψ 2 , . . . , ψ N } . The number of sample points in training dataset is N s = 66, 000, 000 for 3000 cases. It should be emphasized that 3000 cases for training are selected randomly and then all the sample points are disrupted together. In the testing process, all the sample points in one specific case with same design variables should be taken as input to predict the whole physical fields.
Implementation of deep learning model. Focusing on the nanofluids convection, we establish the deep learning model as shown in Fig. 2 by deep neural network. To ensure the network convergence, the nondimensionalization and normalization methods are involved to scale the input and output tensor. Thus, the input www.nature.com/scientificreports/ coordinates should be nondimensionalized and normalized while the input parameters of governing equations just need to be normalized. After subsequent operations of deep neural network, interested physical quantities experienced nondimensionalization and normalization operations are predicted. Generally, the measurement loss of the difference between true and predicted normalized physical scalars (the output of DNN after inverse normalization) along with proper optimization algorithm can be utilized to drive the training process of DNN. However, for incorporating the first principle, the conservation loss constructed based on normalized governing equations are required by leveraging automatic difference mechanism. If the output fields are need, then an inverse nondimensionalization should be conducted after the inverse normalization. In the following, we introduce the nondimensionalization and normalization methods applied, the detailed network structure and loss function, and the learning strategy employed in this deep learning framework.
Nondimensionalization and normalization. The order of magnitude of the different physical quantities, pressure, velocities, temperature have a significant relative difference, e.g., p ∼ 10 4 Pa, u ∼ 1 m/s, v ∼ 10 -1 m/s and t ∼ 10 2 K, which casts great difficulty on the training of the neural network. The significant difference in magnitude of the parameters creates a systematic problem for the training of the physics-informed neural network, as this difference in scales will have a severe impact on the magnitude of the back-propagated gradients that adjust the neural network parameters during training. To overcome this problem, we employ a nondimensionalization and normalization technique with the purpose of scaling the input and the output of the neural networks in a proper scale (e.g., (p * , t * , u * , v * ) ∼ O(1)) and normalizing the spatial and temporal coordinates to have zero mean and unit variance for training the neural networks more efficiently. Although there could be a way to weight the components of the loss function to mitigate the bias casted into the loss function due to this discrepancy across scales, this process would require a lot of guess-work and tuning. On the other hand, the proposed nondimensionalization strategy achieves the goal of normalizing the variables in a physically justified and intuitive manner that adheres to the requirements of standard neural net initialization strategies (e.g., Xavier initialization) and yields a robust workflow that is free from ad-hoc hacks and guesswork. For the purpose of nondimensionalization we introduce some characteristic variables, which are commonly used in multi-scale physics modeling 50 in order to simplify the equations. For this problem the characteristic length H and the characteristic velocity U ∞ . are applied. Thus, u * and v * are the non-dimensional velocity along x and y coordinate; p * and t * represent non-dimensional pressure and temperature quantities. The non-dimensional quantities are defined as following: Substituting the Eqs. (14) into the Eq. (11), then the conservation equations can be simplified as Eq. (15).
The Prandtl Number Pr applied in governing equations are shown as below: After the dimension, eight design variables and two coordinates are considered as input. However, the distributions for different variables show a large deviation. Thus, the Z-score normalization method 56  Network structure and loss functions. As described, the input information is a 1-D vector and the output, interested physical quantities, is also a 1-D vector with different size. Thus, the fully-connected (FC) operations are utilized to transform the input feature space to target feature space. For a further description, we use a 1-D vector η D i i ∈ R D i with a length of D i to represent the output tensor of i-th FC layer. Specially, the input information can be indicated by i = 0. Then the mathematic expressions of FC layers can be defined as follows: where W  www.nature.com/scientificreports/ operation σ which is used to perform nonlinear transformation. To prevent the problem of vanishing gradient, the activation function ReLU is utilized and the expression can be written as: It should be noted that the selection of activation function has an important effect on the training and convergence of the deep learning methods. There have been some works on providing more efficient and appropriate activation functions for PINN model. For example, Jagtap et al. 57 proposed an adaptive activation function with the additional scalable parameter introduced in the network. By leveraging the scalable hyper-parameter, the increased convergence and better performance can be achieved. In the following, they 58 further extended this scalable parameter from global adjustment to the hidden layer even the neurons, and the results demonstrate the improved training speed and accuracy. Based on the idea of adaptive activation functions, the deep Kronecker neural networks 59 is proposed by Jagtap. In this paper, we mainly focused on the physical field prediction for the nanofluid in microchannel. Thus, the standard activation function of ReLU is utilized.
In this heat transfer and flow of nanofluids, we employ 10 hidden layers and 32 neurons per hidden layer per output variable (i.e. 4 × 32 = 128 neurons per hidden layer). Since the active function is settled, the learnable parameters in this network will be the weight matrix and bias vector in each FC layer.
After series transformation of all the FC layers, the direct output is the normalized physical quantities and a reverse normalization operation as shown below is required to get proper predicted physical quantities.
In this reverse normalization method, ψ is the predicted physical quantities and ψ ′ is the normalized physical quantities after inverse nondimensionalization obtained at the last layer of the model. The field reconstruction completed by the deep learning model is a kind of regression method to predict physical quantities from input information. Thus, we utilize a loss function L ψ evaluating the distance between predicted physical quantities and the real ones, which is a loss function of the physical field measurements: For a heat transfer and flow problem, the final simulation results in each control volume should approximately satisfy the conservation laws, including mass, momentum, and energy conservations. To make the most of physical principles, the partial derivatives for physical quantities ψ ={p,t,û,v} T are solved by the automatic differential mechanism of PyTorch to acquire the residuals of conservations. The applied residuals of mass, momentum along x and y coordinate and energy conservations are formulated as follows: where L c , L mx , L my and L e means the loss function of mass, momentum along x coordinate, momentum along y coordinate, and energy conservations, respectively, and p , t , u and v denotes the predicted physical quantities. The more accurate the predicted physical fields ψ , the closer to zero the loss function of conservation laws L g = {L c , L mx , L my , L e } is, which means that the control volumes approximately respect the conservation laws. The total loss function is composed by the field loss function and a weighted sum of conservation loss functions: The weight of conservations L aims at balancing the scale of field loss and conservation loss. The training is a search process for a pair of optimal weight matrix W * and bias b * to minimize the total loss function. As shown in Eq. (28), the optimal weight matrix W * and bias b * are the hyperparameters when total loss function L total reaches minimized value. It should be emphasized that this work focuses on the improvement of the incorporation with conservation laws, thus the boundary condition and initial conditions are removed from loss functions. The investigation of boundary and initial conditions can be found in the application of PINN on cardiovascular flows 49 . Two field error criteria named relative L 1 and relative L 2 for each field are used as a metric for evaluation 45 . The calculation for them are presented as follows: where � · � 1 means the norm-1 operation, � · � 2 means the norm-2 operation, and N is the number of sample points of the field in one case. Except for those two normal criteria indicating the deviations of predicted quantities, we also adopt the residuals of governing equations (mass conservation R c , x momentum conservation R mx , y momentum conservation R my and energy conservation R e ) referencing from the numerical software FLUENT (Eq.  in chapter 28.15 of Fluent help document) to evaluate the accuracy of physical fields.
In addition, two common performance characteristics, Nusselt number Nu and fanning friction factor f to test the accuracy of predicted fields. The Nu representing thermal performance is calculated as: where h is heat transfer coefficient; q is heat flux density which is a constant for each case; t w and t f denote the averaged wall temperature and averaged bulk temperature. The f indicating the hydraulic performance is calculated as: where t w is the mean temperature of top and bottom walls; t f is mean fluid temperature; p in is the average pressure at inlet; and p out is the average pressure at outlet. They are shown in Eq. (34).
The relative error (RE) for performance characteristics Nu or f can be calculated as: where y is the parameter calculated from original fields and ŷ is the predicted value extracted from the reconstructed fields. On some level, Nu and f criteria can be considered as another integral weighted form of the field error.

Results
Performance analysis of reconstruction. In this section, we demonstrate that the improved model can reliably reconstruct physical fields for nanofluids flowing in microchannels. The training dataset consists of 3000 unique cases (3000 × 550 × 40 sample points) randomly selected from 6000 cases in total. And the remaining 3000 cases are used as test dataset to illustrate the reconstruction performance from four aspects: physical field visualizations, physical field error, residuals of conservation equations and relative error of performance characteristics.
A collection of examples with varying design parameters is presented to visualize the true, predicted physical fields and absolute error distributions in Fig. 3. Based on the geometry, the microchannels can be divided into four types: protrusion-groove, groove-protrusion, protrusion-protrusion and groove-groove microchannels. Considering the different flow and heat transfer behaviors for four types of microchannels, two examples for each type of microchannels are displayed. Besides, the design variables ( [Re, q, ϕ, R 1 , R 2 , δ 1 , δ 2 , a 3 ] ) are listed at the top of each image to describe the corresponding case.
It can be seen from Fig. 3 that true and predicted pressure both drop down along microchannel and reduces to zero at the outlet as nanofluids developing. Compared with smooth pressure fields of ground truth, the model can reconstruct the pressure field identically in a coarse structure with few discontinuous lines in dramatically changing parts. Due to the heat flux conditions on walls, the nanofluids near walls is heated along microchannel while the temperature of nanofluids in middle keeps around the inlet temperature of 293 K. It should be noted that the two obvious high-temperature zones are found in the leading edge of groove or the trailing edge www.nature.com/scientificreports/ of protrusion, respectively. Even with some dramatic changes in temperature distributions, our approach can generate plausible temperature fields that close to ground truth. And the prediction error mainly concentrated around dramatical changes areas, especially for the leading and trailing edge of groove/protrusion. As for velocity u, different phenomena are observed around grooves and protrusions. In protrusion, a high-velocity zone forms when the microchannel narrows and then flows towards the top wall after the groove. No significant change is found in groove except for lower u in the expansion of microchannel. From the plots in Fig. 3, the reconstructed www.nature.com/scientificreports/ u distributions are consistent with the true distributions. The distribution of velocity v is much more complex, which a low-velocity zone and a high-velocity zone are formed around grooves and protrusions. Though it can be found that the absolute error is much large compared with the velocity field, the large errors only exist at local points, making little influence on global velocity distributions. It can be inferred that predicted velocity v fields resemble the ground truth flow fields. As discussed above, our model can predict plausible physical fields, including pressure, temperature, and velocities, for all kinds of microchannels. www.nature.com/scientificreports/ In Fig. 4, three curves A, B and C are plotted in microchannels to describe the prediction performance near bottom wall, the center of microchannel and near top wall, respectively. Along three curves, the comparisons between predicted pressure, temperature and velocity (u, v) attributes and true fields are presented in Fig. 5, where the shaded areas indicate the groove and protrusion. As shown in plots, the model can favorably predict four field attributes in detail, while velocity v is found close to ground truth with marginal deviations in curve A. This may be partly due to the low values of velocity v near wall. This brilliant prediction ability enables the deep learning model to gather arbitrary points of physical attributes with favorable accuracy and analyze the heat transfer and flow behavior.
To quantitatively investigate the reconstruction performance, the two evaluation criteria relative L 1 and L 2 error as well as the residuals of four conservation equations, mass, momentum, and energy, are discussed in Fig. 6. For four physical attributes, all averaged L 1 and L 2 error is lower than 0.02 and 0.1. The low field criteria distributions indicate that our approach can reconstruct fields for different design variables with high fidelity. From Fig. 6b, the residuals of predicted conservation equations are close to the true residuals and the maximum deviation may be the residual of predicted mass equation which is tenfold true residual. This result illustrates that the reconstructed physical fields almost satisfy the conservation equations. In some way, it can be conjectured that the physical-informed model no longer simply reconstructed physical fields, but approximate the inherent physical laws based on prior information of conservation equations to improve the reconstruction performance.
In flow and heat transfer problem, the most important performance characteristics are Nusselt number Nu representing thermal performance and Fanning friction factor f representing hydraulic performance. In recent decades, numerous studies focused on the surrogate models predicting Nu and f based on measurements or design variables. Herein, the surrogate model is replaced by the reconstruction model, and the characteristics can be extracted from generated fields by integral operations shown in Eq. (32). In Fig. 7, we present the characteristics prediction performance. It is observed that the relative errors of two performance characteristics distributed around 0 with negligible bias. Besides, the relative error of Nu is high to -13% while it is less than 5% for most examples. Likewise, though the maximum relative error of f is high to 23%, most errors are less than 10%. It can be inferred that the accuracies of performance characteristics are high enough to complete diverse engineering applications in the range of studied cases. Overall, the proposed physics-informed reconstruction framework generalizes well for the tasks of field reconstruction and performance prediction.
Compared with classical surrogate models. In the traditional design process, numerical simulations are conducted over and over upon the previous unqualified designs until a satisfying result is obtained. Although the computational ability is powerful nowadays, the design periodic is still dragged by massive numerical simulations which is time-consuming for iterative solution of high-dimensional equations. To accelerate the design process, numerical simulations are replaced by surrogate models to approximate the objective functions, such as Nu and f. However, single surrogate model can only construct one mapping function, and the surrogate model should be renewed once the objective functions changed. Nearly all the objective function is a kind of abstract for physical fields which means that they can be extracted from fields by mathematical methods. Based on this fact, our approach obtains the objective functions directly from physical fields predicted by PINNs, which makes it possible to get any multiple mapping functions together.
In flow and heat transfer problems, performance characteristics Nu and f are widely used as objective functions. Thus, the prediction performance of different traditional surrogate models including Linear Regression (LR), Polynomial Regression (PR), Supported Vector Regression (SVR), Artificial Neural Network (ANN), Gauss Process Regression (GPR), Random Forest (RF), Extreme Gradient Boosting (XGB), our previous reconstruction model constructed by the deep convolutional neural network 36 (RDCNN) and our approach in this paper for Nu and f are plotted in Fig. 8. It should be noted that RDCNN and PINNs are both reconstruction models and they adopt same extraction method of Nu and f from physical fields. However, the RDCNN is different from PINNs by its image-treated physical fields and deep convolutional neural network for reconstruction. To distinguish the prediction performance, three global criteria R-square (R 2 ), mean squared error (MSE) and mean absolute error (MAE) and relative error (RE) of performance characteristics are utilized. The mathematical expressions of three global criteria are described below: www.nature.com/scientificreports/ where y means the original performance characteristics, y ′ means the performance characteristics predicted by surrogate models, y is the mean value of original performance characteristics and N is the total number of testing dataset, which is 3000 for this comparison (3000 samples are applied as training dataset). It can be observed from Fig. 8a,b that reconstruction model RDCNN shows the best prediction performance of Nu ,and our model is slightly lower than RDCNN with 0.992 R 2 score, 0.081 MSE, 0.152 MAE and 88.6% for ± 10% Relative Error (RE), respectively. Among other classical surrogate models, XGB provides best prediction accuracy which is still lower than our reconstruction models. For the prediction performance of f, the improved model outperforms other models with 0.994 R 2 score, 3.89 × 10 -5 MSE, 2.58 × 10 -4 MAE and 92.6% for ± 10% Relative Error (RE). As for other classical surrogate models, the prediction power of XGB is far more than others, but it is still inferior to reconstruction models considering comprehensive performance. The results confirm that the reconstruction models are beneficial to predict performance characteristics based on predicted physical fields compared with regular surrogate models. www.nature.com/scientificreports/ Effect of training size. An inherent problem of data-driven machine learning approaches is that model performance strongly depends on the quality of training dataset. Thus, it is significant to investigate the effect of training size on the reconstruction performance of our reconstruction model. In this section, four training sizes are utilized: 3000 groups of sample points (50%), 2000 groups (33%), 1000 groups (17%) and 500 groups (8%) for all 6000 groups in raw data. Besides, the remain 3000 groups of sample points are taken as testing dataset for all the models with different training size. In the following, the effect of training size is studied from three factors: relative errors of physical fields, residuals of conservation equations and relative errors of performance characteristics. Figure 9 shows the comparisons of relative field errors L 1 and L 2 for four different training size. It is apparent that physical relative errors decrease as training size enlarges from 500 to 3000 groups of sample points and the decrement drops down gradually. Averaged physical errors L 1 and L 2 for all physical fields are under 0.05 with training size greater than 2000 (33%). Once the training size is up to 2000, increasing training size shows a very limited improvement of reconstruction accuracy.  www.nature.com/scientificreports/ In Fig. 10, it is observed that the residuals of predicted conservation equations with four training size are all below 2 × 10 -3 , while the residuals of true conservation equations are lower than 10 -4 . Similar to the physical field relative errors, the residuals of conservation equations keep decreasing till training size is higher than 2000. The varying trend indicates that the reconstruction performance is difficult to be improved through reducing residuals of conservation equations with adequate training samples (2000 groups of sample points in this study).
In addition, the relative errors of attention-attracting performance characteristics Nu and f are presented in Fig. 11. From the box plots for relative error of Nu, it can be found that the relative error of thermal performance is distributed around 0 and the maximum relative error decreases from 12 to 5% with training size increasing from 500 to 3000 groups. As for hydraulic performance f, the averaged relative error fluctuates around 0 and  www.nature.com/scientificreports/ the maximum relative error also decreases from 15 to 8% with larger training size. The higher relative error for f may due to the much smaller values of f and the higher relative errors of pressure attribute. Similar to physical fields relative errors and residuals of conservation equations, the relative errors of performance characteristics show little reduction when training size is larger than 2000. Overall, the increase of training size has an obvious positive effect on reconstruction performance, including reducing physical fields relative errors, regulating residuals of conservation equations and decreasing relative errors of performance characteristics. However, this improvement of reconstruction power is constrained if the training samples are adequate. In the light of this study, training data of 2000 groups is enough to attain excellent PINN model with acceptable accuracy. Extrapolation performance. As discussed above, the applied physics-informed model shows excellent capability for multiple evaluation criteria of interested fields and characteristics. However, it should be noted that the reconstruction of fields above can be regarded as interpolation due to randomly divided datasets whose design variables of training and testing set are under the same probability distribution. To demonstrate the generality and scalability of our method, it is an intuitive idea to investigate extrapolation power of the approachone of the most important problem but perhaps rarely mentioned in recent research. In this section, we evaluate the extrapolation capabilities from two aspects: physical fields relative errors L 2 and relative errors of performance characteristics, Nu and f. Moreover, we repartition different training data set based on the extrapolation of four important parameters Re, q, φ and a 3 , covering the design information related to geometry, nanofluids and boundary conditions. From Figs. 12, 13, 14, 15, the relative L 2 error of physical fields and relative error of characteristics are plotted with varying design variables for training and testing datasets. In addition, the pressure fields in the testing dataset are displayed for visual observation. An obvious result can be found that relative L 2 error and relative error of performance rise gradually as design variables extend outward the training ranges. This indicates a noticeable conclusion that the farther the design variables are away from the training interval, the worse the reconstruction performance. The design variable a 3 , which provides the least impact on the physical fields, has the best extrapolation performance. It is observed that the reconstructed fields in testing dataset show a relatively good match with the ground truth, the relative error L 2 is less than 0.1 except some special cases and the relative   www.nature.com/scientificreports/ error of characteristics concentrated between -10% and 10%. Then the extrapolation performance of φ ranks second, with reasonable physical fields, slightly higher relative error L 2 and larger relative error of performance. As for the boundary conditions of Re and q, the extrapolation performance along increasing variables is pretty good while a clear accelerating downward trend of relative L 2 error and an increasing bias of increasing relative error of performance can be observed with decreasing variable. For the extrapolation of Re, the relative L 2 errors of pressure and velocity u up to 0.5 and the relative error of f ups to 50% with lower Re while the relative error of Nu is much smaller. Besides, the reconstructed pressure fields can only obtain coarse flow patterns in low Re while plausible predictions of pressure fields are found with high Re. The reason for this result is the significant influence of varying Re on pressure. Likewise, due to the close relationship between q and temperature field, the relative L 2 errors of temperature field (maximum of 0.5) and the relative error of Nu (maximum of 25%) is much higher with decreasing q. Besides, the reconstructed physical fields agree well with ground truth with lower q. The results show that our model can predict multiple physical fields and performance characteristics with favorable accuracy if Re and q increase, and acceptable accuracy if Re and q slightly decrease.
In summary, the prediction performance become worse with design variables deviated from training ranges and this is determined by the regression essence of neural network. Besides, the larger the influence of design variable on fields, the less satisfactory the extrapolation performance. Even though the accuracy decreases with the design variable extending, our approach can reconstruct plausible physical fields and predict the thermal and hydraulic performance accurately. Especially for φ and a3, the relative error of performance characteristics ranging from -10% to 10% for almost all cases and the physical fields visualizations are in good agreement with ground truths. It indicates that our model enables relatively accurate prediction out of the training range to some extent.  www.nature.com/scientificreports/

Conclusion
In this study, a physics informed deep neural network incorporating the first principle, which is conservation laws in thermal and fluids mechanism, is proposed to reconstruct physical fields for nanofluids convection with design variables as input, including nanofluids volume fraction, geometric parameters and boundary conditions parameters. The main results are concluded as follows: 1. The prediction power of our model is validated from four factors: the physical fields visualizations resemble the ground truth with reasonable details; the relative L 1 and L 2 for physical fields are quite lower than 0.02 and 0.1; the residuals of conservations close to the results of numerical simulations and the relative error for Nu and f are less than 10% for most cases. 2. Compared with classical surrogate models, reconstruction models show superior prediction performance of either Nu or f due to reconstructed fields (RDCNN ranks 1 for Nu and our model ranks 1 for f). 3. As indicated in the results with different training sizes, the more sample points involved in training, the more powerful the physics-informed model is for reconstructing physical fields. In nanofluids convection, 2000 groups of sample points enable the physics-informed model to achieve best prediction performance approximately. 4. The evaluations of reconstruction performance with extended design variables demonstrate that the proposed model shows certain parametric extrapolation ability for the heat transfer and flow of nanofluids.